<template>
  <div class="language">
    <button class="button" @click="btnClick">
        <i>EN</i>
        <img src="../../assets/images/index/收起.png" alt="">
    </button>
    <div class="select" v-if="showSelect">
         <el-radio v-model="radio" class="label" label="1">English(EN)</el-radio>
         <el-radio v-model="radio" class="label" label="2">简体中文(EN)</el-radio>
         <el-radio v-model="radio" class="label" label="3">简体中文(EN)</el-radio>
         <el-radio v-model="radio" class="label" label="4">简体中文(EN)</el-radio>
         <el-radio v-model="radio" class="label" label="5">简体中文(EN)</el-radio>
         <el-radio v-model="radio" class="label" label="6">简体中文(EN)</el-radio>
    </div>
  </div>
</template>

<script>
export default {
  name: 'language',
  // props:['isShowSelect'],
  data () {
    return {
          radio: '1',
          showSelect:false
    }
  },
  methods:{
    btnClick(){
      this.showSelect = !this.showSelect
      console.log(this.showSelect)
    }
  }
  
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style >
.language{
    position: relative;
}
  .button{
    font-size: 16px;
  border:1px solid #F2B92C;
  border-radius: 20px;
  background: none;
  color: #fff;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  cursor: pointer;
  padding:0 20px;
}
.select{
    position: absolute;
    top: 40px;
    right: 0;
    z-index: 9999;
    padding:0 40px;
    background:rgba(51, 51, 51, 0.6);
    border-radius: 10px;
    height: auto;
    max-height: 264px;
    overflow: auto;
}
.select label{
    display: block;
    height: 52px;
    border-bottom: 1px solid #4d4d4d;
    margin-right: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-flow:row-reverse
}
.select label:last-child{
    border-bottom: none;
}
.label .el-radio__label{
    margin-right: 20px;
}
.label .el-radio__input.is-checked+.el-radio__label{
     color: #fff;
}
.label .el-radio__input.is-checked .el-radio__inner{
    border-color: #F2B92C;
    background: #F2B92C;
}

</style>>
